<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery-3.7.1.min.js"></script>
    <style>
        #box {
            width: 100px;
            height: 100px;
            background-color: red;
        } 

        #container{
            width: 200px;
            height: 100px;
            background-color: gray;
            position: absolute  ;
            padding-left: 110px;
            top:8px;
            display: none;
        }
    </style>
</head>

<body>
    <div id="box"></div>
    <div id="container"></div>

    <script>

     //hover鼠标移入与移出 
        $("#box").hover(
             //鼠标划入
             function(){
              console.log("鼠标进入元素");
              $("#container").css("display","block")
              
             },
            
             //鼠标划出
             function(){
              console.log("鼠标移开元素");
              $("#container").css("dispaly","none")
             }
        )
    </script>
</body>

</html>